{{--@extends ('shop-backend::layout')--}}

{{--@section ('title',  '基本信息')--}}

{{--@section ('breadcrumbs')--}}
    {{--<h2>门店基本信息</h2>--}}
    {{--<ol class="breadcrumb">--}}
        {{--<li><i class="fa fa-dashboard"></i> 首页</li>--}}
        {{--<li>{!! link_to_route('admin.shop.list.store', '门店管理') !!}</li>--}}
        {{--<li class="active">基本信息</li>--}}
    {{--</ol>--}}
{{--@stop--}}
{{--@section('content')--}}
    <div class="ibox float-e-margins">
        <div class="ibox-content" style="display: block;">
            {!! Form::open(['route' => 'admin.shop.store.system', 'class' => 'form-horizontal', 'id'=> 'store-system-settings', 'role' => 'form', 'method' => 'post']) !!}
            <div class="form-group">
                <label class="col-sm-2 control-label">标题后缀 Keyword</label>
                <div class="col-sm-10">
                    <input type="text" name="storeSystemConfig[title_suffix]" value="{{$storeSystemConfig['title_suffix'] or ''}}" class="form-control">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">QQ地图查询键值</label>
                <div class="col-sm-10">
                    <input type="text" name="storeSystemConfig[qqmap_key]" value="{{$storeSystemConfig['qqmap_key'] or '5DZBZ-EN6AU-6NFVH-4SR2M-WEBF2-D3BPP'}}" class="form-control">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">店铺定位默认图</label>
                <div class="col-sm-10">
                    <input type="text" name="storeSystemConfig[store_point_img]" value="{{$storeSystemConfig['store_point_img'] or ''}}" class="form-control">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">关键词</label>
                <div class="col-sm-10">
                    <input type="text" name="storeSystemConfig[keywords]" value="{{$storeSystemConfig['keywords'] or ''}}" class="form-control">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">非手机版转跳页面</label>
                <div class="col-sm-10">
                    <input type="text" name="storeSystemConfig[pc_url]" value="{{$storeSystemConfig['pc_url'] or ''}}" class="form-control">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">品牌名</label>
                <div class="col-sm-10">
                    <input type="text" name="storeSystemConfig[brand]" value="{{$storeSystemConfig['brand'] or ''}}" class="form-control">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">店铺默认图</label>
                <div class="col-sm-10">
                    <input type="text" name="storeSystemConfig[shop_img]" value="{{$storeSystemConfig['shop_img'] or ''}}" class="form-control">
                </div>
            </div>

            <div class="well">
                <div class="pull-right">
                    <input type="submit" class="btn btn-success btn-xs" value="保存"/>
                </div>
                <div class="clearfix"></div>
            </div>
            {!! Form::close() !!}
        </div>
    </div>
{{--@stop--}}

{{--@section('after-scripts-end')--}}
    <script>
        $(function () {
            // save return
            $('#store-system-settings').ajaxForm({
                success: function (result) {
                    if (200 == result.code) {
                        swal({
                            title: "保存成功！",
                            text: "",
                            type: "success"
                        }, function () {
                            window.location = '{{route('admin.shop.store.system')}}';
                        });
                    } else {
                        swal("保存失败!", result.message, "error")
                    }

                }
            });
        });
    </script>
{{--@stop--}}